package cunostinte;

public class Record {
	private String persoana;

	private String actiune;

	private String p_locatie;

	private String locatie;

	private String ora1;

	private String min1;

	private String sec1;

	private String ora2;

	private String min2;

	private String sec2;

	public Record(String pers, String act, String p_loc, String loc, String o1,
			String m1, String s1, String o2, String m2, String s2) {
		persoana = pers;
		actiune = act;
		p_locatie = p_loc;
		locatie = loc;
		ora1 = o1;
		min1 = m1;
		sec1 = s1;
		ora2 = o2;
		min2 = m2;
		sec2 = s2;
	}

	public Record() {
	}

	public String toString() {
		if (p_locatie.equals("")) {
			if (locatie.equals("")) {
				return persoana + " " + actiune + " " + ora1 + ":" + min1 + ":"
						+ sec1 + " " + ora2 + ":" + min2 + ":" + sec2 + "\n";
			}
			return persoana + " " + actiune + " " + locatie + " " + ora1 + ":"
					+ min1 + ":" + sec1 + " " + ora2 + ":" + min2 + ":" + sec2
					+ "\n";
		} else
			return persoana + " " + actiune + " " + p_locatie + " " + locatie
					+ " " + ora1 + ":" + min1 + ":" + sec1 + " " + ora2 + ":"
					+ min2 + ":" + sec2 + "\n";
	}

	public void updateLocation(String location) {
		this.locatie = location;
	}

	public boolean hasPLocation() {
		if (p_locatie.equals(""))
			return false;
		else
			return true;
	}
	
	public boolean hasLocation() {
		if (locatie.equals(""))
			return false;
		else
			return true;
	}

	public String getPersoana() {
		return persoana;
	}
	
	public String getActiune() {
		return actiune;
	}

	public String getPLocation() {
		return p_locatie;
	}
	
	public String getLocation() {
		return locatie;
	}

	public String getOra1() {
		return ora1;
	}

	public String getMin1() {
		return min1;
	}

	public String getSec1() {
		return sec1;
	}
	
	public String getOra2() {
		return ora2;
	}

	public String getMin2() {
		return min2;
	}

	public String getSec2() {
		return sec2;
	}
}
